# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 1.4.0
    Contact: james@firefly-iii.org
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from firefly_iii_client.configuration import Configuration


class TransactionSplit(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'amount': 'str',
        'bill_id': 'int',
        'bill_name': 'str',
        'book_date': 'date',
        'budget_id': 'int',
        'budget_name': 'str',
        'bunq_payment_id': 'str',
        'category_id': 'int',
        'category_name': 'str',
        'currency_code': 'str',
        'currency_decimal_places': 'int',
        'currency_id': 'int',
        'currency_name': 'str',
        'currency_symbol': 'str',
        'date': 'date',
        'description': 'str',
        'destination_iban': 'str',
        'destination_id': 'int',
        'destination_name': 'str',
        'destination_type': 'AccountTypeProperty',
        'due_date': 'date',
        'external_id': 'str',
        'foreign_amount': 'str',
        'foreign_currency_code': 'str',
        'foreign_currency_decimal_places': 'int',
        'foreign_currency_id': 'int',
        'foreign_currency_symbol': 'str',
        'import_hash_v2': 'str',
        'interest_date': 'date',
        'internal_reference': 'str',
        'invoice_date': 'date',
        'notes': 'str',
        'order': 'int',
        'original_source': 'str',
        'payment_date': 'date',
        'piggy_bank_id': 'int',
        'piggy_bank_name': 'str',
        'process_date': 'date',
        'reconciled': 'bool',
        'recurrence_count': 'int',
        'recurrence_id': 'int',
        'recurrence_total': 'int',
        'sepa_batch_id': 'str',
        'sepa_cc': 'str',
        'sepa_ci': 'str',
        'sepa_country': 'str',
        'sepa_ct_id': 'str',
        'sepa_ct_op': 'str',
        'sepa_db': 'str',
        'sepa_ep': 'str',
        'source_iban': 'str',
        'source_id': 'int',
        'source_name': 'str',
        'source_type': 'AccountTypeProperty',
        'tags': 'list[str]',
        'transaction_journal_id': 'int',
        'type': 'str',
        'user': 'int'
    }

    attribute_map = {
        'amount': 'amount',
        'bill_id': 'bill_id',
        'bill_name': 'bill_name',
        'book_date': 'book_date',
        'budget_id': 'budget_id',
        'budget_name': 'budget_name',
        'bunq_payment_id': 'bunq_payment_id',
        'category_id': 'category_id',
        'category_name': 'category_name',
        'currency_code': 'currency_code',
        'currency_decimal_places': 'currency_decimal_places',
        'currency_id': 'currency_id',
        'currency_name': 'currency_name',
        'currency_symbol': 'currency_symbol',
        'date': 'date',
        'description': 'description',
        'destination_iban': 'destination_iban',
        'destination_id': 'destination_id',
        'destination_name': 'destination_name',
        'destination_type': 'destination_type',
        'due_date': 'due_date',
        'external_id': 'external_id',
        'foreign_amount': 'foreign_amount',
        'foreign_currency_code': 'foreign_currency_code',
        'foreign_currency_decimal_places': 'foreign_currency_decimal_places',
        'foreign_currency_id': 'foreign_currency_id',
        'foreign_currency_symbol': 'foreign_currency_symbol',
        'import_hash_v2': 'import_hash_v2',
        'interest_date': 'interest_date',
        'internal_reference': 'internal_reference',
        'invoice_date': 'invoice_date',
        'notes': 'notes',
        'order': 'order',
        'original_source': 'original_source',
        'payment_date': 'payment_date',
        'piggy_bank_id': 'piggy_bank_id',
        'piggy_bank_name': 'piggy_bank_name',
        'process_date': 'process_date',
        'reconciled': 'reconciled',
        'recurrence_count': 'recurrence_count',
        'recurrence_id': 'recurrence_id',
        'recurrence_total': 'recurrence_total',
        'sepa_batch_id': 'sepa_batch_id',
        'sepa_cc': 'sepa_cc',
        'sepa_ci': 'sepa_ci',
        'sepa_country': 'sepa_country',
        'sepa_ct_id': 'sepa_ct_id',
        'sepa_ct_op': 'sepa_ct_op',
        'sepa_db': 'sepa_db',
        'sepa_ep': 'sepa_ep',
        'source_iban': 'source_iban',
        'source_id': 'source_id',
        'source_name': 'source_name',
        'source_type': 'source_type',
        'tags': 'tags',
        'transaction_journal_id': 'transaction_journal_id',
        'type': 'type',
        'user': 'user'
    }

    def __init__(self, amount=None, bill_id=None, bill_name=None, book_date=None, budget_id=None, budget_name=None, bunq_payment_id=None, category_id=None, category_name=None, currency_code=None, currency_decimal_places=None, currency_id=None, currency_name=None, currency_symbol=None, date=None, description=None, destination_iban=None, destination_id=None, destination_name=None, destination_type=None, due_date=None, external_id=None, foreign_amount=None, foreign_currency_code=None, foreign_currency_decimal_places=None, foreign_currency_id=None, foreign_currency_symbol=None, import_hash_v2=None, interest_date=None, internal_reference=None, invoice_date=None, notes=None, order=None, original_source=None, payment_date=None, piggy_bank_id=None, piggy_bank_name=None, process_date=None, reconciled=None, recurrence_count=None, recurrence_id=None, recurrence_total=None, sepa_batch_id=None, sepa_cc=None, sepa_ci=None, sepa_country=None, sepa_ct_id=None, sepa_ct_op=None, sepa_db=None, sepa_ep=None, source_iban=None, source_id=None, source_name=None, source_type=None, tags=None, transaction_journal_id=None, type=None, user=None, local_vars_configuration=None):  # noqa: E501
        """TransactionSplit - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._amount = None
        self._bill_id = None
        self._bill_name = None
        self._book_date = None
        self._budget_id = None
        self._budget_name = None
        self._bunq_payment_id = None
        self._category_id = None
        self._category_name = None
        self._currency_code = None
        self._currency_decimal_places = None
        self._currency_id = None
        self._currency_name = None
        self._currency_symbol = None
        self._date = None
        self._description = None
        self._destination_iban = None
        self._destination_id = None
        self._destination_name = None
        self._destination_type = None
        self._due_date = None
        self._external_id = None
        self._foreign_amount = None
        self._foreign_currency_code = None
        self._foreign_currency_decimal_places = None
        self._foreign_currency_id = None
        self._foreign_currency_symbol = None
        self._import_hash_v2 = None
        self._interest_date = None
        self._internal_reference = None
        self._invoice_date = None
        self._notes = None
        self._order = None
        self._original_source = None
        self._payment_date = None
        self._piggy_bank_id = None
        self._piggy_bank_name = None
        self._process_date = None
        self._reconciled = None
        self._recurrence_count = None
        self._recurrence_id = None
        self._recurrence_total = None
        self._sepa_batch_id = None
        self._sepa_cc = None
        self._sepa_ci = None
        self._sepa_country = None
        self._sepa_ct_id = None
        self._sepa_ct_op = None
        self._sepa_db = None
        self._sepa_ep = None
        self._source_iban = None
        self._source_id = None
        self._source_name = None
        self._source_type = None
        self._tags = None
        self._transaction_journal_id = None
        self._type = None
        self._user = None
        self.discriminator = None

        self.amount = amount
        self.bill_id = bill_id
        self.bill_name = bill_name
        self.book_date = book_date
        self.budget_id = budget_id
        self.budget_name = budget_name
        self.bunq_payment_id = bunq_payment_id
        self.category_id = category_id
        if category_name is not None:
            self.category_name = category_name
        self.currency_code = currency_code
        if currency_decimal_places is not None:
            self.currency_decimal_places = currency_decimal_places
        self.currency_id = currency_id
        if currency_name is not None:
            self.currency_name = currency_name
        if currency_symbol is not None:
            self.currency_symbol = currency_symbol
        self.date = date
        self.description = description
        self.destination_iban = destination_iban
        self.destination_id = destination_id
        self.destination_name = destination_name
        if destination_type is not None:
            self.destination_type = destination_type
        self.due_date = due_date
        self.external_id = external_id
        self.foreign_amount = foreign_amount
        self.foreign_currency_code = foreign_currency_code
        self.foreign_currency_decimal_places = foreign_currency_decimal_places
        self.foreign_currency_id = foreign_currency_id
        self.foreign_currency_symbol = foreign_currency_symbol
        self.import_hash_v2 = import_hash_v2
        self.interest_date = interest_date
        self.internal_reference = internal_reference
        self.invoice_date = invoice_date
        self.notes = notes
        self.order = order
        self.original_source = original_source
        self.payment_date = payment_date
        if piggy_bank_id is not None:
            self.piggy_bank_id = piggy_bank_id
        if piggy_bank_name is not None:
            self.piggy_bank_name = piggy_bank_name
        self.process_date = process_date
        if reconciled is not None:
            self.reconciled = reconciled
        if recurrence_count is not None:
            self.recurrence_count = recurrence_count
        self.recurrence_id = recurrence_id
        if recurrence_total is not None:
            self.recurrence_total = recurrence_total
        self.sepa_batch_id = sepa_batch_id
        self.sepa_cc = sepa_cc
        self.sepa_ci = sepa_ci
        self.sepa_country = sepa_country
        self.sepa_ct_id = sepa_ct_id
        if sepa_ct_op is not None:
            self.sepa_ct_op = sepa_ct_op
        self.sepa_db = sepa_db
        self.sepa_ep = sepa_ep
        self.source_iban = source_iban
        self.source_id = source_id
        self.source_name = source_name
        if source_type is not None:
            self.source_type = source_type
        self.tags = tags
        if transaction_journal_id is not None:
            self.transaction_journal_id = transaction_journal_id
        self.type = type
        if user is not None:
            self.user = user

    @property
    def amount(self):
        """Gets the amount of this TransactionSplit.  # noqa: E501

        Amount of the transaction.  # noqa: E501

        :return: The amount of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this TransactionSplit.

        Amount of the transaction.  # noqa: E501

        :param amount: The amount of this TransactionSplit.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and amount is None:  # noqa: E501
            raise ValueError("Invalid value for `amount`, must not be `None`")  # noqa: E501

        self._amount = amount

    @property
    def bill_id(self):
        """Gets the bill_id of this TransactionSplit.  # noqa: E501

        Optional. Use either this or the bill_name  # noqa: E501

        :return: The bill_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._bill_id

    @bill_id.setter
    def bill_id(self, bill_id):
        """Sets the bill_id of this TransactionSplit.

        Optional. Use either this or the bill_name  # noqa: E501

        :param bill_id: The bill_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._bill_id = bill_id

    @property
    def bill_name(self):
        """Gets the bill_name of this TransactionSplit.  # noqa: E501

        Optional. Use either this or the bill_id  # noqa: E501

        :return: The bill_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._bill_name

    @bill_name.setter
    def bill_name(self, bill_name):
        """Sets the bill_name of this TransactionSplit.

        Optional. Use either this or the bill_id  # noqa: E501

        :param bill_name: The bill_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._bill_name = bill_name

    @property
    def book_date(self):
        """Gets the book_date of this TransactionSplit.  # noqa: E501


        :return: The book_date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._book_date

    @book_date.setter
    def book_date(self, book_date):
        """Sets the book_date of this TransactionSplit.


        :param book_date: The book_date of this TransactionSplit.  # noqa: E501
        :type: date
        """

        self._book_date = book_date

    @property
    def budget_id(self):
        """Gets the budget_id of this TransactionSplit.  # noqa: E501

        The budget ID for this transaction.  # noqa: E501

        :return: The budget_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._budget_id

    @budget_id.setter
    def budget_id(self, budget_id):
        """Sets the budget_id of this TransactionSplit.

        The budget ID for this transaction.  # noqa: E501

        :param budget_id: The budget_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._budget_id = budget_id

    @property
    def budget_name(self):
        """Gets the budget_name of this TransactionSplit.  # noqa: E501

        The name of the budget to be used. If the budget name is unknown, the ID will be used or the value will be ignored.  # noqa: E501

        :return: The budget_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._budget_name

    @budget_name.setter
    def budget_name(self, budget_name):
        """Sets the budget_name of this TransactionSplit.

        The name of the budget to be used. If the budget name is unknown, the ID will be used or the value will be ignored.  # noqa: E501

        :param budget_name: The budget_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._budget_name = budget_name

    @property
    def bunq_payment_id(self):
        """Gets the bunq_payment_id of this TransactionSplit.  # noqa: E501

        Internal ID of bunq transaction.  # noqa: E501

        :return: The bunq_payment_id of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._bunq_payment_id

    @bunq_payment_id.setter
    def bunq_payment_id(self, bunq_payment_id):
        """Sets the bunq_payment_id of this TransactionSplit.

        Internal ID of bunq transaction.  # noqa: E501

        :param bunq_payment_id: The bunq_payment_id of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._bunq_payment_id = bunq_payment_id

    @property
    def category_id(self):
        """Gets the category_id of this TransactionSplit.  # noqa: E501

        The category ID for this transaction.  # noqa: E501

        :return: The category_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """Sets the category_id of this TransactionSplit.

        The category ID for this transaction.  # noqa: E501

        :param category_id: The category_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._category_id = category_id

    @property
    def category_name(self):
        """Gets the category_name of this TransactionSplit.  # noqa: E501

        The name of the category to be used. If the category is unknown, it will be created. If the ID and the name point to different categories, the ID overrules the name.  # noqa: E501

        :return: The category_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._category_name

    @category_name.setter
    def category_name(self, category_name):
        """Sets the category_name of this TransactionSplit.

        The name of the category to be used. If the category is unknown, it will be created. If the ID and the name point to different categories, the ID overrules the name.  # noqa: E501

        :param category_name: The category_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._category_name = category_name

    @property
    def currency_code(self):
        """Gets the currency_code of this TransactionSplit.  # noqa: E501

        Currency code. Default is the source account's currency, or the user's default currency. Can be used instead of currency_id.  # noqa: E501

        :return: The currency_code of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this TransactionSplit.

        Currency code. Default is the source account's currency, or the user's default currency. Can be used instead of currency_id.  # noqa: E501

        :param currency_code: The currency_code of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._currency_code = currency_code

    @property
    def currency_decimal_places(self):
        """Gets the currency_decimal_places of this TransactionSplit.  # noqa: E501

        Number of decimals used in this currency.  # noqa: E501

        :return: The currency_decimal_places of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._currency_decimal_places

    @currency_decimal_places.setter
    def currency_decimal_places(self, currency_decimal_places):
        """Sets the currency_decimal_places of this TransactionSplit.

        Number of decimals used in this currency.  # noqa: E501

        :param currency_decimal_places: The currency_decimal_places of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._currency_decimal_places = currency_decimal_places

    @property
    def currency_id(self):
        """Gets the currency_id of this TransactionSplit.  # noqa: E501

        Currency ID. Default is the source account's currency, or the user's default currency. Can be used instead of currency_code.  # noqa: E501

        :return: The currency_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._currency_id

    @currency_id.setter
    def currency_id(self, currency_id):
        """Sets the currency_id of this TransactionSplit.

        Currency ID. Default is the source account's currency, or the user's default currency. Can be used instead of currency_code.  # noqa: E501

        :param currency_id: The currency_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._currency_id = currency_id

    @property
    def currency_name(self):
        """Gets the currency_name of this TransactionSplit.  # noqa: E501


        :return: The currency_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._currency_name

    @currency_name.setter
    def currency_name(self, currency_name):
        """Sets the currency_name of this TransactionSplit.


        :param currency_name: The currency_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._currency_name = currency_name

    @property
    def currency_symbol(self):
        """Gets the currency_symbol of this TransactionSplit.  # noqa: E501


        :return: The currency_symbol of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._currency_symbol

    @currency_symbol.setter
    def currency_symbol(self, currency_symbol):
        """Sets the currency_symbol of this TransactionSplit.


        :param currency_symbol: The currency_symbol of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._currency_symbol = currency_symbol

    @property
    def date(self):
        """Gets the date of this TransactionSplit.  # noqa: E501

        Date of the transaction  # noqa: E501

        :return: The date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this TransactionSplit.

        Date of the transaction  # noqa: E501

        :param date: The date of this TransactionSplit.  # noqa: E501
        :type: date
        """
        if self.local_vars_configuration.client_side_validation and date is None:  # noqa: E501
            raise ValueError("Invalid value for `date`, must not be `None`")  # noqa: E501

        self._date = date

    @property
    def description(self):
        """Gets the description of this TransactionSplit.  # noqa: E501

        Description of the transaction.  # noqa: E501

        :return: The description of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this TransactionSplit.

        Description of the transaction.  # noqa: E501

        :param description: The description of this TransactionSplit.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and description is None:  # noqa: E501
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

    @property
    def destination_iban(self):
        """Gets the destination_iban of this TransactionSplit.  # noqa: E501


        :return: The destination_iban of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._destination_iban

    @destination_iban.setter
    def destination_iban(self, destination_iban):
        """Sets the destination_iban of this TransactionSplit.


        :param destination_iban: The destination_iban of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._destination_iban = destination_iban

    @property
    def destination_id(self):
        """Gets the destination_id of this TransactionSplit.  # noqa: E501

        ID of the destination account. For a deposit or a transfer, this must always be an asset account. For withdrawals this must be an expense account.  # noqa: E501

        :return: The destination_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._destination_id

    @destination_id.setter
    def destination_id(self, destination_id):
        """Sets the destination_id of this TransactionSplit.

        ID of the destination account. For a deposit or a transfer, this must always be an asset account. For withdrawals this must be an expense account.  # noqa: E501

        :param destination_id: The destination_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._destination_id = destination_id

    @property
    def destination_name(self):
        """Gets the destination_name of this TransactionSplit.  # noqa: E501

        Name of the destination account. You can submit the name instead of the ID. For everything except transfers, the account will be auto-generated if unknown, so submitting a name is enough.  # noqa: E501

        :return: The destination_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._destination_name

    @destination_name.setter
    def destination_name(self, destination_name):
        """Sets the destination_name of this TransactionSplit.

        Name of the destination account. You can submit the name instead of the ID. For everything except transfers, the account will be auto-generated if unknown, so submitting a name is enough.  # noqa: E501

        :param destination_name: The destination_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._destination_name = destination_name

    @property
    def destination_type(self):
        """Gets the destination_type of this TransactionSplit.  # noqa: E501


        :return: The destination_type of this TransactionSplit.  # noqa: E501
        :rtype: AccountTypeProperty
        """
        return self._destination_type

    @destination_type.setter
    def destination_type(self, destination_type):
        """Sets the destination_type of this TransactionSplit.


        :param destination_type: The destination_type of this TransactionSplit.  # noqa: E501
        :type: AccountTypeProperty
        """

        self._destination_type = destination_type

    @property
    def due_date(self):
        """Gets the due_date of this TransactionSplit.  # noqa: E501


        :return: The due_date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._due_date

    @due_date.setter
    def due_date(self, due_date):
        """Sets the due_date of this TransactionSplit.


        :param due_date: The due_date of this TransactionSplit.  # noqa: E501
        :type: date
        """

        self._due_date = due_date

    @property
    def external_id(self):
        """Gets the external_id of this TransactionSplit.  # noqa: E501

        Reference to external ID in other systems.  # noqa: E501

        :return: The external_id of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._external_id

    @external_id.setter
    def external_id(self, external_id):
        """Sets the external_id of this TransactionSplit.

        Reference to external ID in other systems.  # noqa: E501

        :param external_id: The external_id of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._external_id = external_id

    @property
    def foreign_amount(self):
        """Gets the foreign_amount of this TransactionSplit.  # noqa: E501

        The amount in a foreign currency.  # noqa: E501

        :return: The foreign_amount of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._foreign_amount

    @foreign_amount.setter
    def foreign_amount(self, foreign_amount):
        """Sets the foreign_amount of this TransactionSplit.

        The amount in a foreign currency.  # noqa: E501

        :param foreign_amount: The foreign_amount of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._foreign_amount = foreign_amount

    @property
    def foreign_currency_code(self):
        """Gets the foreign_currency_code of this TransactionSplit.  # noqa: E501

        Currency code of the foreign currency. Default is NULL. Can be used instead of the foreign_currency_id, but this or the ID is required when submitting a foreign amount.  # noqa: E501

        :return: The foreign_currency_code of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._foreign_currency_code

    @foreign_currency_code.setter
    def foreign_currency_code(self, foreign_currency_code):
        """Sets the foreign_currency_code of this TransactionSplit.

        Currency code of the foreign currency. Default is NULL. Can be used instead of the foreign_currency_id, but this or the ID is required when submitting a foreign amount.  # noqa: E501

        :param foreign_currency_code: The foreign_currency_code of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._foreign_currency_code = foreign_currency_code

    @property
    def foreign_currency_decimal_places(self):
        """Gets the foreign_currency_decimal_places of this TransactionSplit.  # noqa: E501

        Number of decimals in the currency  # noqa: E501

        :return: The foreign_currency_decimal_places of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._foreign_currency_decimal_places

    @foreign_currency_decimal_places.setter
    def foreign_currency_decimal_places(self, foreign_currency_decimal_places):
        """Sets the foreign_currency_decimal_places of this TransactionSplit.

        Number of decimals in the currency  # noqa: E501

        :param foreign_currency_decimal_places: The foreign_currency_decimal_places of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._foreign_currency_decimal_places = foreign_currency_decimal_places

    @property
    def foreign_currency_id(self):
        """Gets the foreign_currency_id of this TransactionSplit.  # noqa: E501

        Currency ID of the foreign currency. Default is null. Is required when you submit a foreign amount.  # noqa: E501

        :return: The foreign_currency_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._foreign_currency_id

    @foreign_currency_id.setter
    def foreign_currency_id(self, foreign_currency_id):
        """Sets the foreign_currency_id of this TransactionSplit.

        Currency ID of the foreign currency. Default is null. Is required when you submit a foreign amount.  # noqa: E501

        :param foreign_currency_id: The foreign_currency_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._foreign_currency_id = foreign_currency_id

    @property
    def foreign_currency_symbol(self):
        """Gets the foreign_currency_symbol of this TransactionSplit.  # noqa: E501


        :return: The foreign_currency_symbol of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._foreign_currency_symbol

    @foreign_currency_symbol.setter
    def foreign_currency_symbol(self, foreign_currency_symbol):
        """Sets the foreign_currency_symbol of this TransactionSplit.


        :param foreign_currency_symbol: The foreign_currency_symbol of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._foreign_currency_symbol = foreign_currency_symbol

    @property
    def import_hash_v2(self):
        """Gets the import_hash_v2 of this TransactionSplit.  # noqa: E501

        Hash value of original import transaction (for duplicate detection).  # noqa: E501

        :return: The import_hash_v2 of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._import_hash_v2

    @import_hash_v2.setter
    def import_hash_v2(self, import_hash_v2):
        """Sets the import_hash_v2 of this TransactionSplit.

        Hash value of original import transaction (for duplicate detection).  # noqa: E501

        :param import_hash_v2: The import_hash_v2 of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._import_hash_v2 = import_hash_v2

    @property
    def interest_date(self):
        """Gets the interest_date of this TransactionSplit.  # noqa: E501


        :return: The interest_date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._interest_date

    @interest_date.setter
    def interest_date(self, interest_date):
        """Sets the interest_date of this TransactionSplit.


        :param interest_date: The interest_date of this TransactionSplit.  # noqa: E501
        :type: date
        """

        self._interest_date = interest_date

    @property
    def internal_reference(self):
        """Gets the internal_reference of this TransactionSplit.  # noqa: E501

        Reference to internal reference of other systems.  # noqa: E501

        :return: The internal_reference of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._internal_reference

    @internal_reference.setter
    def internal_reference(self, internal_reference):
        """Sets the internal_reference of this TransactionSplit.

        Reference to internal reference of other systems.  # noqa: E501

        :param internal_reference: The internal_reference of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._internal_reference = internal_reference

    @property
    def invoice_date(self):
        """Gets the invoice_date of this TransactionSplit.  # noqa: E501


        :return: The invoice_date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._invoice_date

    @invoice_date.setter
    def invoice_date(self, invoice_date):
        """Sets the invoice_date of this TransactionSplit.


        :param invoice_date: The invoice_date of this TransactionSplit.  # noqa: E501
        :type: date
        """

        self._invoice_date = invoice_date

    @property
    def notes(self):
        """Gets the notes of this TransactionSplit.  # noqa: E501


        :return: The notes of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this TransactionSplit.


        :param notes: The notes of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._notes = notes

    @property
    def order(self):
        """Gets the order of this TransactionSplit.  # noqa: E501

        Order of this entry in the list of transactions.  # noqa: E501

        :return: The order of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._order

    @order.setter
    def order(self, order):
        """Sets the order of this TransactionSplit.

        Order of this entry in the list of transactions.  # noqa: E501

        :param order: The order of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._order = order

    @property
    def original_source(self):
        """Gets the original_source of this TransactionSplit.  # noqa: E501

        System generated identifier for original creator of transaction.  # noqa: E501

        :return: The original_source of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._original_source

    @original_source.setter
    def original_source(self, original_source):
        """Sets the original_source of this TransactionSplit.

        System generated identifier for original creator of transaction.  # noqa: E501

        :param original_source: The original_source of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._original_source = original_source

    @property
    def payment_date(self):
        """Gets the payment_date of this TransactionSplit.  # noqa: E501


        :return: The payment_date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._payment_date

    @payment_date.setter
    def payment_date(self, payment_date):
        """Sets the payment_date of this TransactionSplit.


        :param payment_date: The payment_date of this TransactionSplit.  # noqa: E501
        :type: date
        """

        self._payment_date = payment_date

    @property
    def piggy_bank_id(self):
        """Gets the piggy_bank_id of this TransactionSplit.  # noqa: E501

        Optional. Use either this or the piggy_bank_name  # noqa: E501

        :return: The piggy_bank_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._piggy_bank_id

    @piggy_bank_id.setter
    def piggy_bank_id(self, piggy_bank_id):
        """Sets the piggy_bank_id of this TransactionSplit.

        Optional. Use either this or the piggy_bank_name  # noqa: E501

        :param piggy_bank_id: The piggy_bank_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._piggy_bank_id = piggy_bank_id

    @property
    def piggy_bank_name(self):
        """Gets the piggy_bank_name of this TransactionSplit.  # noqa: E501

        Optional. Use either this or the piggy_bank_id  # noqa: E501

        :return: The piggy_bank_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._piggy_bank_name

    @piggy_bank_name.setter
    def piggy_bank_name(self, piggy_bank_name):
        """Sets the piggy_bank_name of this TransactionSplit.

        Optional. Use either this or the piggy_bank_id  # noqa: E501

        :param piggy_bank_name: The piggy_bank_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._piggy_bank_name = piggy_bank_name

    @property
    def process_date(self):
        """Gets the process_date of this TransactionSplit.  # noqa: E501


        :return: The process_date of this TransactionSplit.  # noqa: E501
        :rtype: date
        """
        return self._process_date

    @process_date.setter
    def process_date(self, process_date):
        """Sets the process_date of this TransactionSplit.


        :param process_date: The process_date of this TransactionSplit.  # noqa: E501
        :type: date
        """

        self._process_date = process_date

    @property
    def reconciled(self):
        """Gets the reconciled of this TransactionSplit.  # noqa: E501

        If the transaction has been reconciled already. When you set this, the amount can no longer be edited by the user.  # noqa: E501

        :return: The reconciled of this TransactionSplit.  # noqa: E501
        :rtype: bool
        """
        return self._reconciled

    @reconciled.setter
    def reconciled(self, reconciled):
        """Sets the reconciled of this TransactionSplit.

        If the transaction has been reconciled already. When you set this, the amount can no longer be edited by the user.  # noqa: E501

        :param reconciled: The reconciled of this TransactionSplit.  # noqa: E501
        :type: bool
        """

        self._reconciled = reconciled

    @property
    def recurrence_count(self):
        """Gets the recurrence_count of this TransactionSplit.  # noqa: E501

        The # of the current transaction created under this recurrence.  # noqa: E501

        :return: The recurrence_count of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._recurrence_count

    @recurrence_count.setter
    def recurrence_count(self, recurrence_count):
        """Sets the recurrence_count of this TransactionSplit.

        The # of the current transaction created under this recurrence.  # noqa: E501

        :param recurrence_count: The recurrence_count of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._recurrence_count = recurrence_count

    @property
    def recurrence_id(self):
        """Gets the recurrence_id of this TransactionSplit.  # noqa: E501

        Reference to recurrence that made the transaction.  # noqa: E501

        :return: The recurrence_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._recurrence_id

    @recurrence_id.setter
    def recurrence_id(self, recurrence_id):
        """Sets the recurrence_id of this TransactionSplit.

        Reference to recurrence that made the transaction.  # noqa: E501

        :param recurrence_id: The recurrence_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._recurrence_id = recurrence_id

    @property
    def recurrence_total(self):
        """Gets the recurrence_total of this TransactionSplit.  # noqa: E501

        Total number of transactions expected to be created by this recurrence repetition. Will be 0 if infinite.  # noqa: E501

        :return: The recurrence_total of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._recurrence_total

    @recurrence_total.setter
    def recurrence_total(self, recurrence_total):
        """Sets the recurrence_total of this TransactionSplit.

        Total number of transactions expected to be created by this recurrence repetition. Will be 0 if infinite.  # noqa: E501

        :param recurrence_total: The recurrence_total of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._recurrence_total = recurrence_total

    @property
    def sepa_batch_id(self):
        """Gets the sepa_batch_id of this TransactionSplit.  # noqa: E501

        SEPA Batch ID  # noqa: E501

        :return: The sepa_batch_id of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_batch_id

    @sepa_batch_id.setter
    def sepa_batch_id(self, sepa_batch_id):
        """Sets the sepa_batch_id of this TransactionSplit.

        SEPA Batch ID  # noqa: E501

        :param sepa_batch_id: The sepa_batch_id of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_batch_id = sepa_batch_id

    @property
    def sepa_cc(self):
        """Gets the sepa_cc of this TransactionSplit.  # noqa: E501

        SEPA Clearing Code  # noqa: E501

        :return: The sepa_cc of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_cc

    @sepa_cc.setter
    def sepa_cc(self, sepa_cc):
        """Sets the sepa_cc of this TransactionSplit.

        SEPA Clearing Code  # noqa: E501

        :param sepa_cc: The sepa_cc of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_cc = sepa_cc

    @property
    def sepa_ci(self):
        """Gets the sepa_ci of this TransactionSplit.  # noqa: E501

        SEPA Creditor Identifier  # noqa: E501

        :return: The sepa_ci of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ci

    @sepa_ci.setter
    def sepa_ci(self, sepa_ci):
        """Sets the sepa_ci of this TransactionSplit.

        SEPA Creditor Identifier  # noqa: E501

        :param sepa_ci: The sepa_ci of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_ci = sepa_ci

    @property
    def sepa_country(self):
        """Gets the sepa_country of this TransactionSplit.  # noqa: E501

        SEPA Country  # noqa: E501

        :return: The sepa_country of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_country

    @sepa_country.setter
    def sepa_country(self, sepa_country):
        """Sets the sepa_country of this TransactionSplit.

        SEPA Country  # noqa: E501

        :param sepa_country: The sepa_country of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_country = sepa_country

    @property
    def sepa_ct_id(self):
        """Gets the sepa_ct_id of this TransactionSplit.  # noqa: E501

        SEPA end-to-end Identifier  # noqa: E501

        :return: The sepa_ct_id of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ct_id

    @sepa_ct_id.setter
    def sepa_ct_id(self, sepa_ct_id):
        """Sets the sepa_ct_id of this TransactionSplit.

        SEPA end-to-end Identifier  # noqa: E501

        :param sepa_ct_id: The sepa_ct_id of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_ct_id = sepa_ct_id

    @property
    def sepa_ct_op(self):
        """Gets the sepa_ct_op of this TransactionSplit.  # noqa: E501

        SEPA Opposing Account Identifier  # noqa: E501

        :return: The sepa_ct_op of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ct_op

    @sepa_ct_op.setter
    def sepa_ct_op(self, sepa_ct_op):
        """Sets the sepa_ct_op of this TransactionSplit.

        SEPA Opposing Account Identifier  # noqa: E501

        :param sepa_ct_op: The sepa_ct_op of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_ct_op = sepa_ct_op

    @property
    def sepa_db(self):
        """Gets the sepa_db of this TransactionSplit.  # noqa: E501

        SEPA mandate identifier  # noqa: E501

        :return: The sepa_db of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_db

    @sepa_db.setter
    def sepa_db(self, sepa_db):
        """Sets the sepa_db of this TransactionSplit.

        SEPA mandate identifier  # noqa: E501

        :param sepa_db: The sepa_db of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_db = sepa_db

    @property
    def sepa_ep(self):
        """Gets the sepa_ep of this TransactionSplit.  # noqa: E501

        SEPA External Purpose indicator  # noqa: E501

        :return: The sepa_ep of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ep

    @sepa_ep.setter
    def sepa_ep(self, sepa_ep):
        """Sets the sepa_ep of this TransactionSplit.

        SEPA External Purpose indicator  # noqa: E501

        :param sepa_ep: The sepa_ep of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._sepa_ep = sepa_ep

    @property
    def source_iban(self):
        """Gets the source_iban of this TransactionSplit.  # noqa: E501


        :return: The source_iban of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._source_iban

    @source_iban.setter
    def source_iban(self, source_iban):
        """Sets the source_iban of this TransactionSplit.


        :param source_iban: The source_iban of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._source_iban = source_iban

    @property
    def source_id(self):
        """Gets the source_id of this TransactionSplit.  # noqa: E501

        ID of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account.  # noqa: E501

        :return: The source_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._source_id

    @source_id.setter
    def source_id(self, source_id):
        """Sets the source_id of this TransactionSplit.

        ID of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account.  # noqa: E501

        :param source_id: The source_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._source_id = source_id

    @property
    def source_name(self):
        """Gets the source_name of this TransactionSplit.  # noqa: E501

        Name of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account. Can be used instead of the source_id. If the transaction is a deposit, the source_name can be filled in freely: the account will be created based on the name.  # noqa: E501

        :return: The source_name of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._source_name

    @source_name.setter
    def source_name(self, source_name):
        """Sets the source_name of this TransactionSplit.

        Name of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account. Can be used instead of the source_id. If the transaction is a deposit, the source_name can be filled in freely: the account will be created based on the name.  # noqa: E501

        :param source_name: The source_name of this TransactionSplit.  # noqa: E501
        :type: str
        """

        self._source_name = source_name

    @property
    def source_type(self):
        """Gets the source_type of this TransactionSplit.  # noqa: E501


        :return: The source_type of this TransactionSplit.  # noqa: E501
        :rtype: AccountTypeProperty
        """
        return self._source_type

    @source_type.setter
    def source_type(self, source_type):
        """Sets the source_type of this TransactionSplit.


        :param source_type: The source_type of this TransactionSplit.  # noqa: E501
        :type: AccountTypeProperty
        """

        self._source_type = source_type

    @property
    def tags(self):
        """Gets the tags of this TransactionSplit.  # noqa: E501

        Array of tags.  # noqa: E501

        :return: The tags of this TransactionSplit.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this TransactionSplit.

        Array of tags.  # noqa: E501

        :param tags: The tags of this TransactionSplit.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

    @property
    def transaction_journal_id(self):
        """Gets the transaction_journal_id of this TransactionSplit.  # noqa: E501

        ID of the underlying transaction journal. Each transaction consists of a transaction group (see the top ID) and one or more journals making up the splits of the transaction.   # noqa: E501

        :return: The transaction_journal_id of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._transaction_journal_id

    @transaction_journal_id.setter
    def transaction_journal_id(self, transaction_journal_id):
        """Sets the transaction_journal_id of this TransactionSplit.

        ID of the underlying transaction journal. Each transaction consists of a transaction group (see the top ID) and one or more journals making up the splits of the transaction.   # noqa: E501

        :param transaction_journal_id: The transaction_journal_id of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._transaction_journal_id = transaction_journal_id

    @property
    def type(self):
        """Gets the type of this TransactionSplit.  # noqa: E501

        Type of transaction.  # noqa: E501

        :return: The type of this TransactionSplit.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this TransactionSplit.

        Type of transaction.  # noqa: E501

        :param type: The type of this TransactionSplit.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["withdrawal", "deposit", "transfer", "reconciliation", "opening balance"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

    @property
    def user(self):
        """Gets the user of this TransactionSplit.  # noqa: E501

        User ID  # noqa: E501

        :return: The user of this TransactionSplit.  # noqa: E501
        :rtype: int
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this TransactionSplit.

        User ID  # noqa: E501

        :param user: The user of this TransactionSplit.  # noqa: E501
        :type: int
        """

        self._user = user

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, TransactionSplit):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, TransactionSplit):
            return True

        return self.to_dict() != other.to_dict()
